 $(document).ready(function(){
		//for video response
		$(".inner").fitVids();

		//for static bg
		var element = $('.container-bg');
		element.width($('.container-inner').width() + 40);
		$(window).resize(function(){
			element.width($('.container-inner').width() + 40);
		 });
		
	    var distanceTop = element.offset().top;
	    
	    $(document).scroll(function(){
	   	if( $(window).scrollTop() > distanceTop){
	    	$('.container-bg').css({'top':'-10px','position' : 'fixed'})
	   	}else
	   	{
	   		$('.container-bg').css({'top':'0px','position' : 'relative'})
	   	}
	   });

	    var element2 = $('.container-bg');
		
	    var distanceTop = element2.offset().top;
	    
	    $(document).scroll(function(){
	   	if( $(window).scrollTop() > distanceTop){
	    	$('.top-menu').css({'top':'-30px','position' : 'fixed', 'z-index' : '111'})
	    	$('.top-menu').width($('.container-inner').width() + 40);
	   	}else
	   	{
	   		$('.top-menu').css({'top':'0px','position' : 'relative'})
	   	}
	   });
		   
		//For Smooth Scrolling
		var element1 = $('a[href*=#]');
		element1.bind('click',function(event){
			event.preventDefault();
			element1.removeClass('active');
            var $anchor = $(this);
            $anchor.addClass('active');
            $('html, body').stop().animate({
                scrollTop: $($anchor.attr('href')).offset().top
            }, 1000);
        });

		//width
	    $('.moreContent').width($('.container-inner').width()+10);
	    $(window).resize(function(){
	    	$('.moreContent').width($('.container-inner').width() - 5);
	    	$('.top-menu').width($('.container-inner').width() + 40);
		 });

	    // For Toggle Menu Bar
	      $(".btn-navbar").click( function(e){
	    	 e.preventDefault();
		     var element = $(".collapse");
		     if(!element.height()){element.animate({height:$("li", element).length*50.+'px'});}
		     else{element.animate({height:'0'});}
		   });
	  });